<!DOCTYPE html>
<html>
<head>
    <title>Bootstrap5 实例</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="https://cdn.staticfile.org/twitter-bootstrap/5.1.1/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.staticfile.org/twitter-bootstrap/5.1.1/js/bootstrap.bundle.min.js"></script>
</head>
<body>


<div class="container">
    <h2>表单验证</h2>
    <p>使用 .was-validated 类显示表单在提交之前需要填写的内容：</p>
    <form action="Student/login.do" class="was-validated" >
        <div class="form-group">
            <label for="uname">用户名:</label>
            <input type="text" class="form-control" id="uname" placeholder="Enter username" name="uname" required>
            <div class="valid-feedback">验证成功！</div>
            <div class="invalid-feedback">请输入用户名！</div>
        </div>
        <div class="form-group">
            <label for="pwd">密码:</label>
            <input type="password" class="form-control" id="pwd" placeholder="Enter password" name="pswd" required>
            <div class="valid-feedback">验证成功！</div>
            <div class="invalid-feedback">请输入密码！</div>
        </div>
        <div>
            <select name="xiala">
                <option value="管理员">管理员</option>
                <option  value="普通用户">普通用户</option>
            </select>

        </div>
        <div class="form-group form-check">
            <label class="form-check-label">
                <input class="form-check-input" type="checkbox" name="remember" required> 同意协议
                <div class="valid-feedback">验证成功！</div>
                <div class="invalid-feedback">同意协议才能提交。</div>
            </label>
        </div>
        <button type="submit" class="btn btn-primary">提交</button>
    </form>
</div>

</body>
</html>